# -*- coding:utf-8 -*-
import platform
import os
import shutil
import sys
import time
import math
import json
import zipfile

sys.path.append("..")
sys.path.append("../Helper")

import FileUtils
from HotUpdateHelper import HotUpdateHelper



curPath = os.getcwd()
print(curPath)

sysstr = platform.system()
print(platform)





config = FileUtils.getJsonFileData(os.path.join(curPath,"config.json"))
# _VersionHelper = VersionHelper()







if __name__ == "__main__":
	_HotUpdateHelper = HotUpdateHelper()
	
	if len(sys.argv) > 1:
		command = sys.argv[1]
		if command == "reset":
			_HotUpdateHelper.resetVersion()
			pass
		elif command == "init":
			_HotUpdateHelper.initVersion()
			pass
		elif command == "update":
			_HotUpdateHelper.packageHotUpdate()
		elif command == "testEncry":
			_HotUpdateHelper.encry()
		elif command == "-v" or command == "version":
			#打印版本
			_HotUpdateHelper.printVersion()
		elif command == "test":
			_HotUpdateHelper.resetVersion()
			_HotUpdateHelper.initVersion()
			_HotUpdateHelper.packageHotUpdate()
	else:
		print("\n\n")
		print("********************************************************")
		print("#### 命令  python main.py reset 	:清理项目,并且重置版本为1.0.0")
		print("#### 命令  python main.py init 	:初始化项目")
		print("#### 命令  python main.py update 	:打热更包")
		print("#### 命令  python main.py -v 		:查看当前版本")
		print("********************************************************")
		print("\n\n")
		pass

	pass
